package com.zhongwang.business.module.taskManage.dao;

import com.zhongwang.business.gen.entity.Task;
import com.zhongwang.business.module.taskManage.model.TaskBoardModel;
import com.zhongwang.business.module.taskManage.model.TaskModel;
import com.zhongwang.business.module.taskManage.model.UnassignedTaskModel;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @InterfaceName： UnassignedTaskDao
 * @Description： 获取待下达的项目信息列表
 * @Author： 闫薇
 * @date： 2020/8/20 13:18
 * @version： V1.0
 **/
@Repository
public interface UnassignedTaskDao {

    List<UnassignedTaskModel> selectUnassignedTaskList(UnassignedTaskModel model);


    /**
     * 查询是否存在
     * @param model
     * @return
     */
      List<UnassignedTaskModel> selectIsExistsTask(UnassignedTaskModel model);

    /**
     * 执行添加
     * @param model
     * @return
     */
    Integer addUnassignedTask(UnassignedTaskModel model);

    /**
     * 执行修改
     * @param model
     * @return
     */
    Integer updUnassignedReamrk(UnassignedTaskModel model);

    /**
     * 2020.9.23 暂时作废。
     * @param model
     * @return
     */
    List<UnassignedTaskModel> selectTaskListOld(UnassignedTaskModel model);

    List<UnassignedTaskModel> selectTaskList(UnassignedTaskModel model);

    Integer returnUnassignedTask(UnassignedTaskModel model);

    Integer updUnassignedTask(UnassignedTaskModel model);

    Integer updTaskData(TaskModel model);



    Integer delUnassignedTask(Integer id);

    List<UnassignedTaskModel> selectAllProjectTaskList(UnassignedTaskModel model);

    int updIsExpedited(UnassignedTaskModel model);

    List<UnassignedTaskModel> selectYears();

    UnassignedTaskModel selectOneTaskInfo(Integer id);

    List<TaskBoardModel> selectTaskProgressById(Integer id);

    List<TaskBoardModel> selectDataStatusById(TaskBoardModel model);

    /**
     * 任务的备注
     * @param model
     * @return
     */
    TaskBoardModel selectReamrkById(TaskBoardModel model);

//    <select id="selectDataStatusById"  statementType="CALLABLE" parameterType="com.zhongwang.business.module.taskManage.model.TaskBoardModel" resultType="com.zhongwang.business.module.taskManage.model.TaskBoardModel">
//    {call sp_data_status(#{id,mode=IN,jdbcType=INTEGER},#{kind,mode=IN,jdbcType=INTEGER})}
//    </select>

    List<TaskBoardModel> selectAppProgressById(TaskBoardModel model);

    /**
     * 各个环节的附件
     * @param model
     * @return
     */
    List<TaskBoardModel> selectNodeFilesById(TaskBoardModel model);

    /**
     * 根据id查询附件
     * @param id
     * @return
     */
    TaskBoardModel selectFilesById (Integer id);

    TaskBoardModel selectFilescCntById(TaskBoardModel model);

    TaskBoardModel selectBJFilescCntById(TaskBoardModel model);

    TaskBoardModel selectHTFilescCntById(TaskBoardModel model);

    TaskBoardModel selectKPFilescCntById(TaskBoardModel model);

    UnassignedTaskModel selectTaskOfProjectByCode(String code);

    TaskModel selTaskOfBllIdByProjectId(TaskModel model);

    UnassignedTaskModel selectUnTaskOfRemark(Integer id);

    UnassignedTaskModel unTaskCnt();

    List<TaskBoardModel> selectContractFilesById(TaskBoardModel model);
}
